#FROM openjdk:17-slim As builder
#WORKDIR /java
#ARG JAR_FILE=target/eureka-0.0.1.jar
#COPY ${JAR_FILE} app.jar
#RUN java -Djarmode=layertools -jar app.jar extract
#FROM openjdk:17-silm
#WORKDIR /java
#COPY --from=builder /java/dependencies/ ./
#COPY --from=builder /java/spring-boot-loader/ ./
#COPY --from=builder /java/snapshot-dependencies/ ./
#COPY --from=builder /java/application/ ./
#ENTRYPOINT ["java", "org.springframework.boot.loader.launch.JarLauncher"]
#EXPOSE 8080

# 使用官方OpenJDK作为基础镜像
FROM openjdk:17-jdk-slim

# 添加维护者信息
LABEL maintainer="lintley"

# 设置工作目录
WORKDIR /app

# 将构建的jar包添加到容器中并更名为app.jar
COPY /target/*.jar app.jar
ENV API_VERSION=v1
# 指定容器启动时执行的命令
ENTRYPOINT ["java", "-jar", "app.jar"]